home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE03 / INTERNAL / C.C next >
Text File  |  1995-06-09  |  692b  |  29 lines

  1. #include    <windows.h>
  2.           
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7. void WINAPI DateSelSetCaption (LPCSTR lpCaption);
  8. void WINAPI DateSelSetHelpInfo (LPCSTR HelpFile, DWORD HelpContext);
  9. BOOL WINAPI DateSelDialog (LPINT TheDate);
  10.  
  11. #ifdef  __cplusplus
  12. }
  13. #endif
  14.  
  15. int i;
  16. char buff [128];
  17.  
  18. int PASCAL WinMain (HINSTANCE hInst, HINSTANCE hPrev, 
  19.             LPSTR lpCmdLine, int nCmdShow)
  20. {   
  21.     // Let's have a custom Caption 
  22.     DateSelSetCaption ("Calling Delphi from Vanilla C");
  23.  
  24.     lstrcpy (buff, "You made no choice");
  25.     if (DateSelDialog (&i)) wvsprintf (buff, "You chose %d !", &i);
  26.     MessageBox (0, buff, "C Language Caller", MB_OK);
  27.     return (0);
  28. }
  29.